﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;

namespace BizzReports
{
    public class BizzQuery
    {
        private string connectionString = ConfigurationManager.AppSettings["BizzReportsDB"].ToString();
        
        public string queryString { get; set; }

        public DataSet ExecuteQuery()
        {
            DataSet dsResult = new DataSet();
            using (SqlConnection connection = new SqlConnection(connectionString))
            {
                SqlDataAdapter da = new SqlDataAdapter(queryString, connection);
                try
                {
                    connection.Open();
                    da.Fill(dsResult);    
                 }
                 catch (Exception ex)
                 {
                   
                 }
                 
            }
            return dsResult;
        }
    }
}
